package com.yenlien.traceyun.breed.controller;

import com.yenlien.traceyun.breed.dao.PreventDao;
import com.yenlien.traceyun.webase.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: bigwangy@sina.com
 * @create: 2021-01-12
 * @description:
 **/

@RestController
@RequestMapping("/breed/traceinfo")
public class BreedTraceInfoController extends BaseController {

    @Autowired
    private PreventDao preventDao;

    /**
     * 获取防疫信息
     *
     * @param code
     * @return
     */
    @GetMapping(value = "/prevent/{code}")
    private Object preventInfo(@PathVariable("code") String code) {
        return preventDao.findByCode(code);
    }
}
